% conv_encoder using the function of conv
% (2,1,k), k is determined by the size of g
% for example: input = [1 0 1 1 1], g1 = [1 0 1 1], g2 = [1 1 1 1];
% output is [1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1]

function output = conv1(input, g1, g2)
	cip1 = mod(conv(input, g1), 2);
	cip2 = mod(conv(input, g2), 2);
	cip = [cip1; cip2];
	output = reshape(cip,1, numel(cip));
